package aad.storyboard.transitions;

import aad.storyboard.controller.Transition;
import android.view.animation.AlphaAnimation;
import android.widget.RelativeLayout;
import android.widget.ViewFlipper;

public class FadeOutTransition extends Transition{	
	
	public FadeOutTransition(int startTime, long duration, ViewFlipper flipper) {
			super (startTime, duration);	
			this.current=(RelativeLayout)flipper.getChildAt(flipper.getDisplayedChild());
		
	}
		
	@Override
	public void execute() {
		final AlphaAnimation alphaAnimation = new AlphaAnimation(1F, 0F);
		alphaAnimation.setDuration(duration);		
		this.current.startAnimation(alphaAnimation);
		setStarted(true);		
	}

	@Override
	public void undo() {
		// TODO Auto-generated method stub
		
	}

	

	
}
